//package com.example.compose
//
//import androidx.annotation.DrawableRes
//import androidx.compose.animation.AnimatedVisibility
//import androidx.compose.animation.ExperimentalSharedTransitionApi
//import androidx.compose.animation.SharedTransitionLayout
//import androidx.compose.animation.fadeIn
//import androidx.compose.animation.fadeOut
//import androidx.compose.foundation.layout.size
//import androidx.compose.foundation.layout.wrapContentWidth
//import androidx.compose.material3.Text
//import androidx.compose.runtime.Composable
//import androidx.compose.ui.Modifier
//import androidx.compose.ui.platform.LocalContext
//import androidx.compose.ui.platform.LocalInspectionMode
//import androidx.compose.ui.res.painterResource
//import androidx.compose.ui.tooling.preview.Preview
//import androidx.compose.ui.unit.dp
//import coil.compose.AsyncImage
//import coil.request.ImageRequest
//
//@OptIn(ExperimentalSharedTransitionApi::class)
//@Preview
//@Composable
//private fun SharedAsyncImage() {
//    SharedTransitionLayout {
//        AnimatedVisibility(visible = true) {
//            AsyncImage(
//                model = ImageRequest.Builder(LocalContext.current)
//                    .data(data = "https://pic2.zhimg.com/80/v2-7f5e7ec5909bc70c37badc889ed52089_720w.webp")
//                    .crossfade(enable = true)
//                    .placeholderMemoryCacheKey("image-key")
//                    .memoryCacheKey("image-key")
//                    .build(),
//                contentDescription = null,
//                placeholder = null,
//                modifier = Modifier
//                    .size(500.dp)
//                    .sharedBounds(
//                        sharedContentState = rememberSharedContentState(key = "image-key"),
//                        animatedVisibilityScope = this
//                    )
//            )
//        }
//    }
//}
//
//@Composable
//fun DebugPlaceholder(@DrawableRes debugPreview: Int) {
//    if (LocalInspectionMode.current) {
//        painterResource(id = debugPreview)
//    } else {
//        null
//    }
//}
//
//@OptIn(ExperimentalSharedTransitionApi::class)
//@Preview
//@Composable
//private fun SharedElementTypicalUseText() {
//    SharedTransitionLayout {
//        AnimatedVisibility(visible = true) {
//            Text(
//                text = "this is an example of how to share text",
//                modifier = Modifier
//                    .wrapContentWidth()
//                    .sharedBounds(
//                        sharedContentState = rememberSharedContentState(key = "shared Text"),
//                        animatedVisibilityScope = this,
//                        enter = fadeIn() + scaleInSharedContentToBounds(),
//                        exit = fadeOut() + scaleOutSharedContentToBounds()
//                    )
//            )
//        }
//    }
//}